package com.export.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import common.statusenum.OrgTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;


/**
 * 账号报表返回数据
 *
 * @author yuanqinglong
 * @since 2021/7/21 16:54
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class AccountReport extends CalculateRate {

    /**
     * 开始时间
     */
    @ExcelProperty(value = "开始时间")
    private String startDate;
    /**
     * 结束时间
     */
    @ExcelProperty(value = "结束时间")
    private String endDate;
    /**
     * 账号标识
     */
    @ExcelProperty(value = "账号标识")
    private String autKeyid;
    /**
     * 机构类别(正式1，测试2)
     */
    @ExcelProperty(value = "账号类型")
    private String orgType;
    /**
     * 客户id
     */
    @ExcelProperty(value = "客户编号")
    private String custId;
    /**
     * 客户简称
     */
    @ExcelProperty(value = "客户简称")
    private String custSname;


    /**
     * 处理属性值
     *
     * @param reportParam 报告参数
     */
    public void processingAttributeValue(ReportParam reportParam){
         startDate = reportParam.getOriginalStartDate();
         endDate = reportParam.getOriginalEndDate();
         orgType = OrgTypeEnum.getMsgByCode(orgType);
         super.calculateRate();
    }

}
